import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)

const routes = [{
    path: '/',
    name: 'Home',
    component: () => import('../views/Home.vue')
  },
  {
    path: '/live',
    name: 'live',
    component: () => import('../views/Live.vue')
  },
  {
    path: '/setting',
    component: () => import('../views/setting/Setting.vue'),
    children: [
      {
        path: '',
        redirect: 'basics-setting'
      },
      {
        path: 'basics-setting',
        component: () => import('../views/setting/cpns/basics-setting.vue')
      },
      {
        path: 'data-resource',
        component: () => import('../views/setting/cpns/data-setting.vue')
      },
      {
        path: 'audio-setting',
        component: () => import('../views/setting/cpns/audio-setting.vue')
      },
      {
        path: 'song-setting',
        name:'song-setting',
        component: () => import('../views/setting/cpns/song-setting.vue')
      }
    ]
  }
]
const router = new VueRouter({
  routes,
  mode: 'hash'
})

export default router